//
//  MovieTableViewCell.m
//  ZAKER
//
//  Created by dllo on 15/8/29.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "MovieTableViewCell.h"

@implementation MovieTableViewCell


-(void)dealloc
{
    
    [_timeLabel release];
    [_titleLabel release];
    [_addressLabel release];
    [_MyImage release];
    
    [super dealloc];
    
}

- (void)awakeFromNib
{
   
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.MyImage = [[[UIImageView alloc]init] autorelease];
        self.MyImage.layer.masksToBounds = YES;
        self.MyImage.layer.cornerRadius = 5;
        [self.contentView addSubview:_MyImage];
        
        
        self.titleLabel = [[[UILabel alloc]init] autorelease];
        _titleLabel.font = [UIFont boldSystemFontOfSize:17];
        _titleLabel.numberOfLines = 0;
        _titleLabel.textAlignment = 1;
        _titleLabel.textColor = [UIColor redColor];
        [self.contentView addSubview:_titleLabel];
        
        
        
        self.addressLabel = [[[UILabel alloc]init] autorelease];
        [self.contentView addSubview:_addressLabel];
        _addressLabel.textColor = [UIColor whiteColor];
        _addressLabel.font = [UIFont boldSystemFontOfSize:14];
        _addressLabel.textAlignment = 1;
        _addressLabel.textColor = [UIColor lightGrayColor];
        
        
        self.timeLabel = [[[UILabel alloc]init] autorelease];
        _timeLabel.textAlignment = 1;
        _timeLabel.font = [UIFont systemFontOfSize:13];
        _timeLabel.textColor = [UIColor blackColor];
        _timeLabel.layer.cornerRadius = 10;
        _timeLabel.layer.masksToBounds = YES;
        [self.contentView addSubview:_timeLabel];

    }
    
    return self;
    
}


-(void)layoutSubviews
{
    
    [super layoutSubviews];
    
    self.MyImage.frame = CGRectMake(5, 2, self.contentView.frame.size.width - 10, 420 * myHeight);
    
    self.titleLabel.frame = CGRectMake(0, 420 * myHeight, self.contentView.frame.size.width, 30 * myHeight);
    
    self.addressLabel.frame = CGRectMake(0, 450 * myHeight , self.contentView.frame.size.width, 20 * myHeight);
    
    self.timeLabel.frame = CGRectMake(100 * myWidth, 470 * myHeight, self.contentView.frame.size.width - 190 * myWidth , 20 * myHeight);
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    
    [super setSelected:selected animated:animated];

}

@end
